//导入request.js工具
import request from '@/utils/request.js'
//导入@/stores/token.js
import { useTokenStore } from '../../stores/token'
//提供调用注册接口
export const admLoginService=(LoginData)=>{
    return request.post('/login',LoginData);
}
//提供修改密码接口
export const admUpdatePwdService=(params)=>{
    //获取token状态
    return request.post('/user/updatePwd', params)   
}
//获取个人信息
export const admInfoGetService = ()=>{
     //获取token状态
     const tokenStore = useTokenStore()
    return request.get('/adm/admInfo',{ headers: { 'Authorization': tokenStore.token } });
}
//修改个人信息
export const admInfoUpdateService = (admInfo)=>{
     //获取token状态
     const tokenStore = useTokenStore()
    return request.put('/adm/update',admInfo,{ headers: { 'Authorization': tokenStore.token } })
}
export const getVerifiCodeService=(uid)=>{
    return request.get("/login/getVerify",{uid})
}
export const getInfo=()=>{
    return request.post("/getInfo")
}
//退出
export const Userlogout=()=>{
    return request.post("/logout")
}
//运动会管理
export const getPageService=(model)=>{
    return request.post("/sportsYear/adm/getSportsYear",model)
}
//添加运动会
export const add=(model)=>{
    return request.post("/sportsYear/adm/addSportsYear",model)
}
//查看统计信息
export const statistic=()=>{
    return request.post("/sportsYear/adm/statistic")
}
//
export const getDataStatistic=(model)=>{
    return request.post("sportsYear/adm/getData",model)
}